package com.hc.oauthserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hc.oauthserver.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    @Select("select id,role from role,user_role where user_role.rid=role.id and user_role.uid=#{uid}")
    List<Role> findByUid(String uid);
}
